'use strict'

 const { DataTypes, Model, Op } = require('../../../azeroth').sequelize;
 class PolAoui_2 extends Model { }

  const initPolAoiData_2 = (sequelize_aim) => {
    PolAoui_2.init(
         {
            id: {
                autoIncrement: true,
                type: DataTypes.INTEGER,
                allowNull: false,
                primaryKey: true
              },
              panel_id: {
                type: DataTypes.STRING(255),
                allowNull: true
              },
              sheet_id: {
                type: DataTypes.INTEGER,
                allowNull: true
              }
         }, 
         {
             freezeTableName: true,
             sequelize: sequelize_aim,
             modelName: 'pol_aoi',
             timestamps: false
         }
     )
  }

  PolAoui_2.upload = async (data) => {
     let res = await PolAoui_2.bulkCreate([data], {updateOnDuplicate: ['id']});
     return res;
 }

 module.exports = {
     PolAoui_2,
     initPolAoiData_2
 };